package com.yhd.cloud.service;

import com.google.gson.Gson;
import com.yhd.cloud.mapper.ProductMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * @author yinhuidong3@xiaomi.com
 * @since 2021/7/27
 */
@Service
@Slf4j
public class ProductService {

    @Value("${server.port}")
    private String PORT;
    @Value("${spring.application.name}")
    private String SERVER_NAME;
    @Resource
    private ProductMapper productMapper;
    @Transactional
    public String delProductNumById(Integer skuId,Integer skuNum){
        productMapper.delProductNumById(skuId,skuNum);
        return "success";
    }
}
